// 导出excel处理方法, 区分天眼查等

const axios = require("axios")
// 天眼查查询
async function getInvestTree(keyword) {
  const url = "http://open.api.tianyancha.com/services/v3/open/investtree"
  const headers = { Authorization: "5826afef-8b42-4d09-80e4-063551764cae" }
  const params = {
    flag: 4,
    dir: "down",
    keyword
  }
  const res = await axios.get(url, { params, headers })
  return JSON.parse(res.data.result)
}

module.exports = getInvestTree

